<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>文字输入效果</title>
  <style>
    body {
      margin:0;
      width: 100vw;
      height: 100vh;
      background:#000;
      display: flex;
      justify-content: center;
      align-items: center;
      font-family: consolas;
    }
    .loading {
      position: relative;
      color:#eee;
      letter-spacing: 5px;
      font-size: 72px;
      animation: typing 3s steps(10);
      overflow: hidden;
    }
    .loading::before {
      content:'';
      width:2px;
      height: 100%;
      background:#eee;
      position:absolute;
      top:0;
      right:2px;
      animation: inputLine 0.8s steps(3) infinite;
      z-index:999;
    }
    @keyframes inputLine {
      0%, 75% {
        opacity: 1;
      }
      76%, 100% {
        opacity: 0;
      }
    }
    @keyframes typing {
      0% {
        width: 0px;
      }
      100% {
        width:436.38px;
      }
    }
  </style>
</head>
<body>
  <div class="loading">
    LOADING...
  </div>
</body>
</html>